package com.ares.aler.controllr;

import com.ares.aler.service.UniversityArticleDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@Controller
public class UniversityArticleController {

    @Autowired
    UniversityArticleDao universityArticleDao;

    /**
     * 如果参数不对的话  是找不到路径的  会报 page null 错误
     * 前端数据展示页面使用
     * @param page
     * @param limit
     * @return
     */
    @ResponseBody
    @RequestMapping("univerArticleAll")
    public Map univerArticleAll(int page, int limit) {
        return universityArticleDao.selectAllMap(page, limit);
    }
}
